<?php
$this->breadcrumbs=array(
	Yii::t('main','Counters'),
);

$this->menu=array(
	//array('label'=>Yii::t('main','List'), 'url'=>array('index')),
	//array('label'=>Yii::t('main','Create'), 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('counter-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1><?php echo Yii::t('main','Counters')?></h1>

<p>
<?php echo Yii::t('main','You may optionally enter a comparison operator')?>
(<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>&lt;&gt;</b> <?php echo Yii::t('main','or')?> <b>=</b>)
<?php echo Yii::t('main','at the beginning of each of your search values to specify how the comparison should be done.')?>
</p>

<?php echo CHtml::link(Yii::t('main','Advanced Search'),'#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('MyGridView', array(
	'id'=>'counter-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'time',
		'service_id',
		'world_in',
		'world_out',
		'ukraine_in',
		'ukraine_out',
		'cost',
		'packet_id',
		'is_aggregated',
		//array(
			//'class'=>'CButtonColumn',
			//'template'=>'{view}',
		//),
	),
)); ?>
